<template>
	<view class="index">
		<view class="details-header" @click="goBack">
			<image src="https://zsw-bimface-res.izsw.net/img/bim-community/%E5%B7%A6%E7%AE%AD%E5%A4%B4.png" mode="">
			</image>
			<text>返回</text>
		</view>
		<view class="header">
			<view class="nav-content-right" @click='toggleVisibility'>
				<svg v-show="!isListStyle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
					stroke-width="1.5" stroke="#fff" class="w-6 h-6">
					<path stroke-linecap="round" stroke-linejoin="round"
						d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z" />
				</svg>
				<svg v-show="isListStyle" xmlns="http://www.w3.org/2000/svg" fill="#fff" viewBox="0 0 24 24"
					stroke-width="1.5" stroke="#fff" class="w-6 h-6">
					<path stroke-linecap="round" stroke-linejoin="round"
						d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
				</svg>

			</view>
			<!-- 搜索框 -->
			<view class="search-input-wrapper">
				<input type="text" icon="search" v-model="skuname" placeholder="搜索订单" placeholder-class="placeholder" />
				<button class="search-btn" @click="getList()">搜索</button>
			</view>
			<!-- <image src="../../static/sift.png" class="icon-sift"></image> -->
			<view class="filter-container">
				<!-- 筛选按钮 -->
				<view class="filter-header" @click="toggleDropdown">
					<svg t="1706081762581" class="icon" viewBox="0 0 1024 1024" version="1.1"
						xmlns="http://www.w3.org/2000/svg" p-id="4220" width="32" height="32">
						<path
							d="M675.328 117.717333a21.333333 21.333333 0 0 1-16.341333 39.402667A382.762667 382.762667 0 0 0 512 128C299.925333 128 128 299.925333 128 512s171.925333 384 384 384 384-171.925333 384-384c0-51.114667-9.984-100.8-29.12-146.986667a21.333333 21.333333 0 0 1 39.402667-16.341333A425.429333 425.429333 0 0 1 938.666667 512c0 235.648-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333c56.746667 0 112 11.093333 163.328 32.384zM682.666667 384H362.666667l106.666666 142.229333v220.309334a21.333333 21.333333 0 1 1-42.666666 0.064v-206.165334L328.533333 409.6c-24.682667-32.896-7.104-68.266667 34.026667-68.266667h320.213333c41.130667 0 58.794667 35.264 34.026667 68.266667L618.666667 540.437333V640a21.333333 21.333333 0 1 1-42.666667-0.064v-113.706667L682.666667 384z"
							fill="#794cc3" p-id="4221"></path>
					</svg>
				</view>
			</view>
		</view>
		<view>
			<view class="level">
				<view v-for="(item, index) in levelList" :key="index" @click="getList(index)"
					:class="{ active: activeLevel === index }">
					{{ item }}
				</view>
			</view>
			<view class="all">
				<view class="check" v-if="activeLevel == 0 || activeLevel == 5 || activeLevel == 2">
					<label>
						<checkbox color="rgb(108, 67, 255)" background-color="#151515" border-color="rgb(108, 67, 255)"
							activeBackgroundColor="#151515" activeBorderColor="rgb(108, 67, 255)"
							:checked="isAllSelected" @click="toggleSelectAll" />
					</label>
					<text>全选</text>
				</view>
				<view class="right" v-if="activeLevel == 5" @click="unlockAllItems()">
					一键解锁
				</view>
				<view class="right" v-if="activeLevel == 0" @click="lockAllItems()">
					一键锁定
				</view>
			</view>
			<!-- 待处理 锁定  转让 -->
			<view class="showactiveLevel"
				v-if="activeLevel === 0 || activeLevel === 1 || activeLevel === 2 || activeLevel === 3 || activeLevel === 5">
				<view v-if="itemDataEmpty" style="height: 70vh;overflow: hidden;">
					<NoData></NoData>
				</view>
				<view class="" v-else>
					<view class="itemListBox"
						v-if="itemList.length && activeLevel !== 4 && activeLevel !== 6 && activeLevel !== 7">

						<view class="itemList" :class="listStyle">
							<uni-collapse @change="getSkuDetails" accordion v-model="collapseValue">
								<uni-collapse-item v-for="(item, index) in itemList" :key="index" :title="item.skuName">
									<scroll-view class="scroll-view-item-list" :scroll-y="true"
										:style="{ height: scrollHeight + 'rpx' }"
										@scrolltolower="onScrollBottom($event, index)">
										<template v-if="isSkuItemChange">
											<view class="item unitem" v-for="(sku, i) in itemSkuList[index]"
												:key="sku.packageSkuId">
												<view class="check">
													<!-- isSelected(items.packageSkuId) -->
													<label
														v-if="activeLevel == 0 || activeLevel == 5 || activeLevel == 2">
														<checkbox color="rgb(108, 67, 255)" background-color="#151515"
															border-color="rgb(108, 67, 255)"
															activeBackgroundColor="#151515"
															activeBorderColor="rgb(108, 67, 255)"
															:checked="sku.isItemSelect"
															@click="toggleItemSelection(itemSkuList[index], i, sku.packageSkuId)" />
													</label>
												</view>
												<view class="img">
													<img :src="sku.detailImages" mode="aspectFill" alt="" />
												</view>
												<view class="datas">
													<h2>{{ sku.name }}</h2>
													<p v-if="sku.source == 1"><b>物品来源</b>个人赏</p>
													<p v-else-if="sku.source == 2"><b>物品来源</b>无限赏</p>
													<p v-else-if="sku.source == 3"><b>物品来源</b>一番赏</p>
													<p v-else-if="sku.source == 4"><b>物品来源</b>一元夺宝</p>
													<p v-else-if="sku.source == 5"><b>物品来源</b>转让</p>
													<p v-else-if="sku.source == 6"><b>物品来源</b>系统赠送</p>
													<p v-else-if="sku.source == 7"><b>物品来源</b>玩家赠送</p>
													<p v-else-if="sku.source == 8"><b>物品来源</b>签到奖励</p>
													<p class="price"><b>参考价格</b>{{ sku.moneyPrice }}镇北币</p>
													<p><b>获取时间</b>{{ sku.createTime }}</p>
													<p><b>分解数量</b>{{ sku.spar }}晶石</p>
												</view>
												<view class="lock" v-show="!isListStyle"
													v-if="activeLevel == 0 || activeLevel == 5"
													@click="lockItem(index, i)">
													<svg v-if="sku.locked" t="1706345970798" class="icon"
														viewBox="0 0 1024 1024" version="1.1"
														xmlns="http://www.w3.org/2000/svg" p-id="5532" width="32"
														height="32">
														<path
															d="M753.845117 371.674021l-17.46272 0 0-83.669608c0-59.275012-22.62837-115.203812-63.715137-157.482731-42.170448-43.394323-99.369172-67.291592-161.058163-67.291592-126.040624 0-224.772276 98.731652-224.772276 224.7733l0 83.669608-16.680914 0c-62.788022 0-113.688295 50.900274-113.688295 113.688295L156.467611 842.961784c0 62.788022 50.900274 113.688295 113.688295 113.688295l483.690234 0c62.788022 0 113.688295-50.900274 113.688295-113.688295L867.534436 485.362316C867.532389 422.574295 816.633139 371.674021 753.845117 371.674021zM328.176344 288.005436c0-102.858646 80.573083-183.432753 183.431729-183.432753 50.423413 0 97.093339 19.447934 131.410935 54.762231 33.547047 34.519188 52.021817 80.214926 52.021817 128.670521l0 83.669608L328.176344 371.675044 328.176344 288.005436zM826.191842 842.961784c0 39.956014-32.390711 72.346725-72.346725 72.346725L270.154883 915.308509c-39.956014 0-72.346725-32.390711-72.346725-72.346725L197.808158 485.362316c0-39.956014 32.390711-72.346725 72.346725-72.346725l483.690234 0c39.956014 0 72.346725 32.390711 72.346725 72.346725L826.191842 842.961784z"
															fill="#abadc3" p-id="5533"></path>
														<path
															d="M509.932921 580.446905c-11.416004 0-20.670785 9.254781-20.670785 20.670785l0 109.554138c0 11.414981 9.254781 20.670785 20.670785 20.670785 11.416004 0 20.670785-9.254781 20.670785-20.670785L530.603707 601.116667C530.602683 589.701686 521.348925 580.446905 509.932921 580.446905z"
															fill="#abadc3" p-id="5534"></path>
													</svg>
													<svg v-else t="1706345812900" class="icon" viewBox="0 0 1024 1024"
														version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5233"
														width="32" height="32">
														<path
															d="M757.810429 373.751333 325.645708 373.751333l0-83.895759c0-103.694687 81.507362-184.922686 185.559183-184.922686 78.121242 0 146.053424 46.74565 173.062568 119.090329 3.865028 10.352789 15.384385 15.609513 25.742291 11.746532 10.351766-3.866051 15.609513-15.390525 11.744485-25.742291C688.844707 121.877815 606.198405 64.918545 511.204891 64.918545c-61.918211 0-119.246895 23.662933-161.423483 66.63156-41.3692 42.142819-64.151066 98.363262-64.151066 158.305469l0 83.895759-20.007683 0c-60.774155 0-110.042255 49.267077-110.042255 110.042255l0 366.139981c0 60.774155 49.267077 110.042255 110.042255 110.042255l492.187769 0c60.775178 0 110.042255-49.267077 110.042255-110.042255L867.852684 483.793588C867.852684 423.01841 818.585607 373.751333 757.810429 373.751333zM827.837318 849.933569c0 38.674834-31.352055 70.02689-70.02689 70.02689L265.62266 919.960459c-38.674834 0-70.02689-31.352055-70.02689-70.02689L195.59577 483.793588c0-38.674834 31.352055-70.02689 70.02689-70.02689l492.187769 0c38.674834 0 70.02689 31.352055 70.02689 70.02689L827.837318 849.933569z"
															fill="#abadc3" p-id="5234"></path>
														<path
															d="M509.715981 583.832002c-11.048637 0-20.007683 8.959046-20.007683 20.007683l0 110.042255c0 11.048637 8.958022 20.007683 20.007683 20.007683s20.007683-8.958022 20.007683-20.007683L529.723663 603.839685C529.723663 592.790024 520.765641 583.832002 509.715981 583.832002z"
															fill="#abadc3" p-id="5235"></path>
													</svg>
													<view>{{ sku.locked ? '解锁商品' : "锁定商品" }}</view>
												</view>
											</view>
										</template>
										<template v-else>
											加载中...
										</template>

									</scroll-view>
								</uni-collapse-item>
							</uni-collapse>
						</view>


					</view>
				</view>
			</view>
			<!-- 发货数据 -->
			<view class="showdeliverySkusList" v-if="activeLevel === 4">
				<view class="itemListBox" v-if="activeLevel == 4">
					<view class="tabList">
						<view :class="{ active: activeTab === i }" v-for="(item, i) in tabList" :key="i"
							@click="getTabList(i)">
							{{ item }}
						</view>
					</view>
					<view v-if="deliveryDataEmpty" style="height: 70vh;overflow: hidden;">
						<NoData></NoData>
					</view>
					<view class="itemList" v-else>
						<view v-for="(item, index) in deliverySkusList" :key="index" class="item daditem"
							style="height:280rpx">
							<view class="img">
								<img :src="item.detailImages" alt="" />
							</view>
							<view class="datas" style="height:240rpx">
								<h2>{{ item.name }}</h2>
								<p v-if="item.source == 1"><b>物品来源</b>个人赏</p>
								<p v-else-if="item.source == 2"><b>物品来源</b>无限赏</p>
								<p v-else-if="item.source == 3"><b>物品来源</b>一番赏</p>
								<p v-else-if="item.source == 4"><b>物品来源</b>一元夺宝</p>
								<p v-else-if="item.source == 5"><b>物品来源</b>转让</p>
								<p v-else-if="item.source == 6"><b>物品来源</b>系统赠送</p>
								<p v-else-if="item.source == 7"><b>物品来源</b>玩家赠送</p>
								<p v-else-if="item.source == 8"><b>物品来源</b>签到奖励</p>
								<p class="price"><b>参考价格</b>{{ item.moneyPrice }}</p>
								<p><b>获取时间</b>{{ item.createTime }}</p>
								<p v-if="item.orderNumber"><b>订单编号</b>{{ item.orderNumber }}</p>
								<p v-if="item.trackNumber"><b>快递单号</b>{{ item.trackNumber }}
									<text style="color:#1890FF; margin-left: 10rpx;"
										@tap="setCopyText(item.trackNumber)">复制</text>
								</p>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 待赠送 -->
			<view class="all">
				<!-- <view class="check" v-if="activeLevel==6">
					<label>
						<checkbox color="rgb(108, 67, 255)" background-color="#151515" border-color="rgb(108, 67, 255)"
						 activeBackgroundColor="#151515" activeBorderColor="rgb(108, 67, 255)" :checked="isAllSelected" @click="complimentSelectAll" />
					</label>
					<text>全选</text>
				</view> -->
			</view>
			<view class="showactiveLevel" v-if="activeLevel === 6">
				<view v-if="selectToAccepterComplimentDataEmpty" style="height: 70vh;overflow: hidden;">
					<NoData></NoData>
				</view>
				<view class="" v-else>
					<view class="itemListBox" v-if="activeLevel === 6">
						<view class="itemList" :class="listStyle">
							<view v-for="(items, i) in selectToAccepterComplimentList" :key="i">
								<view v-for="(pack, pIndex) in items.packageSkuList" :key="pIndex" class="item daditem"
									style="margin-top: 20rpx;">
									<!-- <view class="check">
									<label v-if="activeLevel==6">
										<checkbox color="rgb(108, 67, 255)" background-color="#151515" border-color="rgb(108, 67, 255)"
										 activeBackgroundColor="#151515" activeBorderColor="rgb(108, 67, 255)" :checked="complimentSelected(items.id)"
										 @click="complimentItemSelection(items.id)" />
									</label>
								</view> -->
									<view class="img">
										<img :src="pack.detailImages" alt="" />
									</view>
									<view class="presenter">
										<p class="presenter_status">
											{{ items.status == 1 ? '赠送中' : (items.status == 2 ? '已赠送' : '已撤销') }}
										</p>
										<p class="presenter_time">{{ items.createTime }}</p>
										<view class="right_btn_group">
											<span class="u-btn u-primary-btn" v-if="items.status == 1"
												@click="checkDetails(items)">确认赠送</span>
											<span class="u-btn" v-if="items.status == 1"
												@click="revoke(items)">撤销赠送</span>
											<span class="u-btn u-primary-btn" v-if="items.status == 2"
												@click="checkDetails(items)">赠送记录</span>
										</view>
									</view>

								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 已赠送 -->
			<view class="itemListBox" v-if="activeLevel == 7">
				<view v-if="selectComplimentDataEmpty" style="height: 70vh;overflow: hidden;">
					<NoData></NoData>
				</view>
				<view class="itemList" v-else>
					<view v-for="(item, index) in selectComplimentList" :key="index" class="item daditem"
						style="height:260rpx">
						<view class="img">
							<img :src="item.img" alt="" />
						</view>
						<view class="datas" style="height:220rpx">
							<h2>{{ item.name }}</h2>
							<p v-if="item.source == 1"><b>物品来源:</b>个人赏</p>
							<p v-else-if="item.source == 2"><b>物品来源:</b>无限赏</p>
							<p v-else-if="item.source == 3"><b>物品来源:</b>一番赏</p>
							<p v-else-if="item.source == 4"><b>物品来源:</b>一元夺宝</p>
							<p v-else-if="item.source == 5"><b>物品来源:</b>转让</p>
							<p v-else-if="item.source == 6"><b>物品来源:</b>系统赠送</p>
							<p v-else-if="item.source == 7"><b>物品来源:</b>玩家赠送</p>
							<p v-else-if="item.source == 8"><b>物品来源:</b>签到奖励</p>
							<p class="price"><b>参考价格:</b>{{ item.zhenbeiCoin }}</p>
							<p><b>赠送时间:</b>{{ item.updateTime }}</p>
							<p v-if="item.status == 0"><b>赠送状态:</b>未接收</p>
							<p v-if="item.status == 1"><b>赠送状态:</b>已接收</p>
							<p v-if="item.status == 2"><b>赠送状态:</b>赠送中</p>
							<p v-if="item.giveUserName"><b>被赠送人:</b>{{ item.giveUserName }}</p>
							<p v-else><b>赠送人:</b>{{ item.benefactorName }}</p>
						</view>
					</view>
				</view>
			</view>
			<!-- 底部按钮 -->
			<view class="bottom" v-if="activeLevel == 0">
				<view class="left" @click="applyForShipment()">
					申请发货
				</view>
				<view class="middle" @click="applyPackClickSale()" v-if="isShowGame == 1">
					转让
				</view>
				<view class="middle" @click="compliment()">
					赠送
				</view>
				<view class="right" @click="revokeDetails()" v-if="isShowShop == 1">
					分解
				</view>
			</view>
			<view class="bottom" v-if="activeLevel == 2">
				<view class="right" @click="removeDeleteSale()">
					取消转让
				</view>
			</view>
			<!-- <view class="bottom" v-if="activeLevel==6">
				<view class="right" @click="chooseDisposeCompliment()">
					确认赠送
				</view>
			</view> -->

			<view class="num" v-if="(activeLevel == 0 || activeLevel == 5) && itemList.length">
				已选择{{ selectedItemCount }}件商品
			</view>
		</view>
		<!-- 转让弹框 -->
		<view class="markDown" v-if="isShowSale"></view>
		<view class="PriceBySku" v-if="isShowSale">
			<view class="sku-money">
				商品市场价为{{ moneyPrice }}镇北币
			</view>
			<view class="sale-sku">
				<input class="sku-input" type="digit" placeholder="请输入转让价" v-model="salePrice" @input="getprice" />
				<view class="" v-if="commissionCharge">
					{{ commissionCharge }}%手续: {{ formattedResult }}
					<!-- {{(commissionCharge * salePrice) / 100 }} -->
				</view>
			</view>

			<view class="sku-btn">
				<button class="btn_01" @click="saleShare(moneyPrice)">确认</button>
				<button class="btn_02" @click="saleCancel">取消</button>
			</view>
		</view>
		<!-- 搜索下拉框 -->
		<view v-if="isDropdownVisible" class="dropdown">
			<text class="dropdown-sift">时间筛选</text>
			<!-- 起始时间-终止时间下拉框 -->
			<view class="time-range">
				<uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" />
			</view>

			<!-- 重置和确认按钮 -->
			<view class="button-container">
				<button class="reset-button" @click="resetFilter">
					<text>重置</text>
				</button>
				<button class="confirm-button" @click="submitData()">
					<text>确认</text>
				</button>
			</view>
		</view>
		<!-- 盒柜中一番赏领取弹框 -->
		<view class="PriceByyfs" v-if="isDropdownYfs">
			<view class="sku-money">
				恭喜您获得以下奖品
			</view>
			<view class="yfs-skuList">
				<view class="sale-yfs" v-for="item in selectYfsAwardList" :key="item.id">
					<image class="yfsImg" :src="item.skuImg" mode=""></image>
					<view class="sku-yfs">
						<p><b>盲盒名：</b>{{ item.boxName }}</p>
						<p><b>商品名：</b>{{ item.skuName }}</p>
						<p><b>商品价格：</b>{{ item.skuPrice }}</p>
					</view>
				</view>
			</view>
			<view class="warnyfs">
				提示：请点击确定领取奖品，奖品来源于一番赏抽奖
			</view>
			<view class="sku-btn">
				<button class="btn_01" @click="yfsRead()">确认</button>
				<button class="btn_02" @click="yfscantel()">取消</button>
			</view>
		</view>
		<navigator url="/pages/rule/rule/rule?id=8">
			<view class="rules">
				盒柜规则
			</view>
		</navigator>
		<navigator url="/pages/rule/rule/rule?id=6" v-if="activeLevel == 7 || activeLevel == 6">
			<view class="comrules">
				赠送规则
			</view>
		</navigator>
		<view v-if="isDropdownVisible || isDropdownYfs" class="mask" @click="closeDropdown"></view>
		<uni-popup ref="popup" type="center" :mask-click="false">
			<view class="popup_content">
				<view class="popop_head">
					<icon type="cancel" size="26" color="#333" @click="close()" />
				</view>
				<view class="popup_title">
					奖品赠送
				</view>
				<view class="popup_details">
					奖品可赠送给您的好友，点击确认赠送好友按钮，转发给您的好友，好友申请领取后，您进行确认赠送即可完成赠送过程。发起赠送的奖品在“盒柜-已赠送”模块查看
				</view>
				<view class="popup_btnGroup">
					<span class="u-btn" @click="close()">取消</span>
					<span class="u-btn u-btn-danger" @click="confirmGift()">确认赠送</span>
				</view>
				<view class="popup_dangerTitle">
					*温馨提示：请谨慎选择赠送对象，防止遭遇诈骗
				</view>
			</view>
		</uni-popup>
	</view>
</template>
<script>
import {
	getPackageSkus,
	getRevokeDetails,
	getSkus,
	setLock,
	getLock,
	delivery,
	deliverySkus,
	alreadyDelivery,
	packClickSale,
	selectMoneyPriceBySkuId,
	deleteSale,
	getcompliment,
	selectCompliment,
	selectGift,
	disposeCompliment,
	selectComplimentAccepter,
	selectYfsAward,
	complimentLink,
	getPackageDetails,
	packageTotal
} from "@/api/myBox.js";
import {
	$getStorage,
	$setStorage,
	$removeStorage
} from "@/utils/auth.js";
import NoData from "@/components/NoData/NoData"
export default {
	data() {
		return {
			// tab栏
			levelList: ['待处理', '已分解', '转让中', '已转让', '发货', '已锁定', '待赠送', '赠送'],
			tabList: ["待发货", "已发货"],
			activeTab: 0,
			activeLevel: 0,
			skuname: "",
			// 控制折叠面板的绑定字段，字段类型为string字符串
			collapseValue: '0',
			// 盒柜列表
			itemList: [],
			itemSkuList: [],
			selectAll: false,
			isDropdownVisible: false,
			// 一番赏弹框
			isDropdownYfs: false,
			// 开始时间
			startDate: '',
			// 结束时间
			endDate: '',
			selectedItems: [], // 保存选中的 packageSkuId 的数组
			complimentItems: [], //保存选中的待赠送数据
			moneyPrice: null,
			// 保存锁定状态的数组
			lockedItems: [],
			isAllSelected: false,
			// 接受选择的收获地址
			address: {},
			// 已发货列表
			deliverySkusList: [],
			// 切换样式
			isListStyle: false,
			// 转让弹框
			isShowSale: false,
			// 转让价
			salePrice: null,
			// 手续费计算
			commissionCharge: '',
			range: [], // 日期范围
			setTime: null, // 输入框延迟检验
			// 赠送列表
			selectComplimentList: [],
			// 被赠送列表
			selectComplimentAccepterList: [],
			// 待赠送列表
			selectToAccepterComplimentList: [],
			deliveryDataEmpty: false, // 第一个 tab 对应的数据为空标志
			itemDataEmpty: false, // 第二个 tab 对应的数据为空标志
			selectComplimentDataEmpty: false, // 第三个 tab 对应的数据为空标志
			selectToAccepterComplimentDataEmpty: false,
			// 一番赏奖品列表
			selectYfsAwardList: [],
			// 等级列表
			sourceitems: [],
			// 分解boxid列表
			boxIdItems: [],
			//商城开启状态
			isShowShop: 0,
			//玩家市场开启状态
			isShowGame: 0,
			// 商品skuid
			skuIdItems: [],
			// 单选的商品背包ID
			skuItem: [],
			// 全选的状态字段，判断是否是点击操作了全选的状态，如是则为yes
			changeAll: 'no',
			isSelected: false,
			isSkuItemChange: false,
			// 选中的商品条数
			selectedItemCount: 0,
			isFetching: false,
			// 是否是筛选跟搜索
			IsFilter: 2,
			// 选中的一级分类的id数组
			selectSkuIds: [],
			scrollHeight: 0,
			page: 1,
			statusPage: false
		}
	},
	computed: {
		userInfo() {
			return this.$store.getters.userInfo
		},
		// 全选选中状态处理
		// isAllSelected() {
		// 	// return this.selectedItemCount === this.getFlattenItemList().length;
		// },

		// 切换样式
		listStyle() {
			return this.isListStyle ? 'colStyle' : '';
		},
		// 计算转让价
		formattedResult() {
			const result = (this.commissionCharge * this.salePrice) / 100;
			return result.toFixed(2); // 保留两位小数
		}
	},
	watch: {
		// itemSkuList: {
		// 	handler(newVal, oldVal) {
		// 		console.log(newVal);
		// 	},
		// 	deep: true,
		// 	immediate: true
		// }
	},
	onLoad() {
		uni.$on('selectAddress', res => {
			this.address = res
		});
		this.currentDate = new Date();
	},
	onShow() {
		this.selectedItems = [];
		this.complimentItems = [];
		this.getList();
		// if ($getStorage("selectItem")) {
		// 	this.getApply();
		// }
		this.updateDataStatus();
		this.getSelectYfsAward();
		this.getShop();
	},
	onUnload() {
		uni.$off('selectAddress', data => {
			console.log('移除 selectAddress 自定义事件');
		})
		// $removeStorage("selectItem")
	},
	onHide() {
		uni.$off('selectAddress', data => {
			console.log('移除 selectAddress 自定义事件');
		})
		// $removeStorage("selectItem")

	},
	methods: {
		// 快递单号复制
		setCopyText(text) {
			uni.setClipboardData({
				data: text,
				success: function (res) {
					uni.showToast({
						title: '复制成功',
						icon: 'none'
					})
				}
			})
		},
		// 滚动到底部时触发
		async onScrollBottom(e, index) {
			if ((this.page_tatal - this.page * 10) <= 0) {
				return
			}
			this.statusPage = true;
			let pages = this.page + 1;
			console.log(pages);

			this.getSkuDetails(index, pages);
		},
		// 返回个人中心页面
		goBack() {
			uni.switchTab({
				url: '/pages/center/index',
			});
		},
		//首页查询商城是否关闭
		getShop() {
			this.$http('/function_switch/all').then(res => {
				this.isShowShop = res.data[1].type
				this.isShowGame = res.data[0].type
				// if (this.isShowShop == 0) {
				// 	uni.showTabBar()
				// 	uni.setTabBarItem({
				// 		index: 1,
				// 		visible: false
				// 	})
				// }
				// if (this.isShowGame == 0) {
				// 	uni.showTabBar()
				// 	uni.setTabBarItem({
				// 		index: 2,
				// 		visible: false
				// 	})
				// }
			})
		},
		// 一番赏的奖品弹框
		getSelectYfsAward() {
			selectYfsAward().then(res => {
				this.selectYfsAwardList = res.data
				if (this.selectYfsAwardList.length == 0) {
					this.isDropdownYfs = false
				} else {
					this.isDropdownYfs = true
				}
			})
		},
		// 一番赏赠送奖品领取方法
		yfsRead() {
			this.$http("/yfs/read", "get").then(res => {
				if (res.code == 200) {
					this.isDropdownYfs = false;
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000,
					});
				} else {
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000,
					});
				}
			})
		},
		yfscantel() {
			this.isDropdownYfs = false
		},
		// 限制转让输入的金额
		getprice() {
			let _this = this
			// console.log(_this.salePrice);
			clearTimeout(_this.setTime)
			_this.setTime = setTimeout(() => {
				// console.log(Number(_this.salePrice))
				// 非数字格式数据提示
				if (Number(_this.salePrice) == 0) {
					uni.showToast({
						title: "请输入数字！",
						icon: 'none',
						duration: 2000,
					});
					return
				}
				// 如果有小数点的提示
				if (_this.salePrice.indexOf('.') != -1) {
					let digit = _this.salePrice.substring(_this.salePrice.indexOf('.') + 1) // 截取小数点后  用来判断是不是两位小数
					// console.log(digit)
					if (digit.length > 2) {
						uni.showToast({
							title: "不能超过两位小数！",
							icon: 'none',
							duration: 2000,
						});
						_this.salePrice = '';
						return
					}

				}
				const regex = /^\d{1,5}(\.\d{1,2})?$/;
				if (!regex.test(_this.salePrice)) {
					uni.showToast({
						title: "金额不能超过十万！",
						icon: 'none',
						duration: 2000,
					});
					_this.salePrice = '';
				}
			}, 500)
		},
		// 切换展示
		toggleVisibility() {
			this.isListStyle = !this.isListStyle;
		},
		// 盒柜列表接口
		async getList(index) {
			this.activeLevel = index ? index : 0;
			if (this.activeLevel != 4 && this.activeLevel != 7 && this.activeLevel != 6) {
				await getPackageSkus({
					status: index ? index + 1 : 1,
					skuName: this.skuname,
					startTime: this.startDate,
					endTime: this.endDate,
				}).then(res => {
					if (res.code === 200) {
						this.itemList = res.data;
						this.updateDataStatus();
						this.isDropdownVisible = false; // 关闭下拉框
						this.itemSkuList = [];
						this.skuIdItems = [];
						this.selectSkuIds = [];
						this.isAllSelected = false;
						this.changeAll = 'no';
						if (this.skuname || this.startTime || this.endTime) {
							this.IsFilter = 1
						} else {
							this.IsFilter = 2
						}
						// 使折叠面板默认是打开的状态
						this.getSkuDetails('0')
						// 选中得数组清空
						// this.selectedItems = [];
						// this.sourceitems = [];
						// this.boxIdItems = [];
						// 二维数组扁平化取到第二层
						// const hasNestedArrays = this.itemList.some(subArray => Array.isArray(subArray));
						// if (!hasNestedArrays) {
						// 	return this.itemList;
						// } else {
						// 	const list = this.itemList.reduce((acc, cur) => acc.concat(cur), []);
						// 	list.forEach(item => {
						// 		this.$set(item, 'isSelected', false);
						// 	})
						// }

						// 取消全选以及单个选中更新查询接口时
						// let that = this
						// this.$set(that, 'isAllSelected', false);
						// 判断当前状态如果为已锁定，显示锁定状态
						// if (this.activeLevel == 5) {
						// 	// 遍历数组添加锁定状态
						// 	list.forEach(item => {
						// 		this.$set(item, 'locked', true);
						// 	})
						// }
					} else if (res.message == "结果为空") {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
						this.itemList = [];
						this.updateDataStatus();
					} else {
						this.itemList = [];
						this.updateDataStatus();
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
					}
				})
			} else if (this.activeLevel == 6) {
				this.getSelectToAccepterCompliment();
			} else if (this.activeLevel == 7) {
				console.log(1);

				// this.getSelectCompliment();
				this.getSelectComplimentAccepter();
			} else {
				// 发货列表的接口
				this.getTabList(0)
			}
		},

		async getSkuDetails(event, pages) {
			this.$nextTick(async () => {
				console.log(event,);
				const item = this.itemList[event];  // 根据 index 获取对应的 item
				// this.itemSkuList[event] = [];
				this.isSkuItemChange = false;
				let activeLevel = this.activeLevel + 1
				if (item) {
					const skuId = item.skuId;  // 获取 skuId
					console.log('---------', pages);
					console.log('---------', this.statusPage);

					await getPackageDetails(skuId, this.statusPage ? pages : this.page, activeLevel).then(res => {
						if (res.data.list.length == 0) {
							return
						}
						this.skuList = res.data.list
						this.page_tatal = res.data.item_total
						this.statusPage = false;
						if (this.skuList && this.skuList.length != 0) {
							const skuitem = this.skuList

							this.scrollHeight = 195 * ((this.page - 1) * 10 + this.skuList.length)
							console.log('00000', this.scrollHeight);

							//如果他等于0或者他里面没有这个数组就塞
							console.log(this.itemSkuList.length);
							console.log(this.itemSkuList[event]);
							if (this.itemSkuList.length == 0 || this.itemSkuList[event] === undefined) {
								this.$set(this.itemSkuList, event, skuitem);
								this.itemSkuList.forEach(sku => {
									sku.forEach(i => {
										if (activeLevel == 6) {
											i.locked = true;
										}
										if (this.changeAll == "yes") {
											i.isItemSelect = true
										} else {
											if (i.isItemSelect) {
												i.isItemSelect = true
											} else {
												i.isItemSelect = false
											}
										}
									})
								})
							} else {
								skuitem.forEach(item => {
									console.log(this.page_tatal);
									console.log(this.itemSkuList.length);
									if (this.page_tatal == this.itemSkuList[event].length) {
										return
									}
									if ((this.page_tatal - this.page * 10) > 0 || this.itemSkuList[event].some(existingItem => existingItem.id !== item.id)) {
										this.itemSkuList[event].push(item);
									}
								});
								this.itemSkuList.forEach(sku => {
									sku.forEach(i => {
										if (activeLevel == 6) {
											i.locked = true;
										}
										if (this.changeAll == "yes") {
											i.isItemSelect = true
										} else {
											if (i.isItemSelect) {
												i.isItemSelect = true
											} else {
												i.isItemSelect = false
											}
										}
									})
								})
								// this.itemSkuList[event].push(...skuitem)
								// console.log(this.itemSkuList);
								// this.isSkuItemChange = true;
								// this.$set(this.itemSkuList, event, skuitem);
							}
							this.isSkuItemChange = true;
						}
						console.log(this.itemSkuList);
					})
				}
			})

		},
		// 待赠送数据
		getSelectToAccepterCompliment() {
			selectGift().then(res => {
				if (res.code == 200) {
					this.selectToAccepterComplimentList = res.data
					this.complimentItems = [];
					this.selectToAccepterComplimentList.forEach(item => {
						this.$set(item, 'complimentSelected', false);
					});
					this.updateDataStatus();
				}
			})
		},
		// 待赠送全选逻辑
		complimentSelectAll() {
			if (this.complimentItems.length === this.selectToAccepterComplimentList.length) {
				this.complimentItems = [];
			} else {
				this.complimentItems = this.selectToAccepterComplimentList.map(item => item.id);
			}
			this.selectToAccepterComplimentList.forEach(item => {
				this.$set(item, 'complimentSelected', this.complimentSelected(item.id));
			});
		},
		// 待赠送单选逻辑
		complimentItemSelection(id) {
			const index = this.complimentItems.indexOf(id);
			if (index !== -1) {
				this.complimentItems.splice(index, 1);
			} else {
				this.complimentItems.push(id);
			}
			// 强制更新选中的视图
			this.$nextTick(() => {
				const item = this.selectToAccepterComplimentList.find(item => item.id === id);
				if (item) {
					this.$set(item, 'complimentSelected', this.complimentSelected(id));
				}
				this.$forceUpdate();
			});
		},
		// 待赠送单个多选框选中的状态
		complimentSelected(id) {
			// 判断某个 packageSkuId 是否在选中数组中
			return this.complimentItems.includes(id);
		},
		updateDataStatus() {
			if (this.activeLevel === 0 || this.activeLevel === 1 || this.activeLevel === 2 || this.activeLevel === 3 ||
				this.activeLevel === 5) {
				this.itemDataEmpty = this.itemList.length === 0;
			} else if (this.activeLevel === 4) {
				this.deliveryDataEmpty = this.deliverySkusList.length === 0;
			} else if (this.activeLevel === 7) {
				console.log(this.selectComplimentList);

				this.selectComplimentDataEmpty = this.selectComplimentList.length === 0;
				console.log(this.selectComplimentDataEmpty);

			} else if (this.activeLevel === 6) {
				this.selectToAccepterComplimentDataEmpty = this.selectToAccepterComplimentList.length === 0;
			}
		},
		// 待赠送确认赠送接口
		chooseDisposeCompliment() {
			console.log(this.complimentItems);
			let that = this
			uni.showModal({
				title: '温馨提示',
				content: '您确定赠送给该用户吗',
				success: function (res) {
					if (res.confirm) {
						disposeCompliment({
							packageSkuIds: that.complimentItems,
							choose: 1
						}).then(res => {
							if (res.code == 200) {
								that.getSelectToAccepterCompliment()
							}
						})
					} else if (res.cancel) {
						disposeCompliment({
							packageSkuIds: that.complimentItems,
							choose: 0
						}).then(res => {
							if (res.code == 200) {
								that.getSelectToAccepterCompliment();
							}
						})
						console.log('取消');
					}
				}
			});
		},
		// 赠送接口
		getSelectCompliment() {
			selectCompliment({
				giveId: this.userInfo.id
			}).then(res => {
				if (res.code == 200) {
					this.selectComplimentList = res.data
				} else {
					this.selectComplimentList = []
				}

			})
		},
		getSelectComplimentAccepter() {
			selectComplimentAccepter({
				accepterId: this.userInfo.id
			}).then(res => {
				this.selectComplimentAccepterList = res.data
				// this.selectComplimentList = [...this.selectComplimentList, ...this
				// 	.selectComplimentAccepterList
				// ]
				this.selectComplimentList = this.selectComplimentList.concat(
					...this.selectComplimentAccepterList.filter(item =>
						!this.selectComplimentList.some(existingItem => existingItem.id === item.id)
					)
				);
				this.updateDataStatus();
			})
		},
		// 发货的切换
		getTabList(i) {
			this.activeTab = i ? i : 0;
			if (this.activeTab == 0) {
				deliverySkus({
					status: 5,
					skuname: this.skuname,
					startTime: this.startDate,
					endTime: this.endDate,
				}).then(res => {
					if (res.code === 200) {
						this.deliverySkusList = res.data;
						this.updateDataStatus();
						this.isDropdownVisible = false; // 关闭下拉框
						// 选中得数组清空
						this.selectedItems = [];
					} else if (res.message == "暂无数据") {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
						this.itemList = [];
						this.deliverySkusList = [];
						this.updateDataStatus();
					} else {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
					}
				})
			} else {
				alreadyDelivery({
					status: 7,
					skuname: this.skuname,
					startTime: this.startDate,
					endTime: this.endDate,
				}).then(res => {
					if (res.code === 200) {
						this.deliverySkusList = res.data
						this.isDropdownVisible = false; // 关闭下拉框
						// 选中得数组清空
						this.selectedItems = [];
						this.updateDataStatus();
					} else if (res.message == "结果为空") {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
						this.itemList = [];
						this.updateDataStatus();
					} else {
						this.deliverySkusList = [];
						this.itemList = [];
						this.updateDataStatus();
						// uni.showToast({
						// 	title: res.message,
						// 	icon: 'none',
						// 	duration: 2000,
						// });
					}
				})
			}

		},
		// 盒柜全选逻辑
		toggleSelectAll() {
			this.isAllSelected = !this.isAllSelected;
			this.selectSkuIds = [];
			// 判断全选如果为选中的状态的话，则把二级分类的商品选中状态进行改变
			if (this.isAllSelected) {
				this.changeAll = 'yes';
				this.itemSkuList.forEach(item => {
					item.forEach(sku => {
						sku.isItemSelect = true
					})
				})
				this.itemList.forEach(item => {
					this.selectSkuIds.push(item.skuId)
				})
				// 调用当前全选后商品的总条数
				packageTotal({
					type: 1,
					isFilter: this.IsFilter,
					boxSkuIds: this.IsFilter == 1 ? this.selectSkuIds : []
				}).then(res => {
					this.selectedItemCount = res.data
				})
			} else {
				this.changeAll = 'no';
				this.itemSkuList.forEach(item => {
					item.forEach(sku => {
						sku.isItemSelect = false
					})
				})
				this.selectedItemCount = 0
			}
		},
		// 将二维数组扁平化
		getFlattenItemList() {
			return this.itemList.reduce((acc, cur) => acc.concat(cur), []);
		},
		// 显示筛选部分
		toggleDropdown() {
			this.isDropdownVisible = !this.isDropdownVisible;
		},
		// 关闭筛选弹框方法
		closeDropdown() {
			this.isDropdownVisible = false;
		},
		// 开始时间赋值
		onStartDateChange(event) {
			this.startDate = event.mp.detail.value;
		},
		// 结束时间赋值
		onEndDateChange(event) {
			this.endDate = event.mp.detail.value;
		},
		// 重置按钮
		resetFilter() {
			// 重置筛选时间逻辑
			this.startDate = '';
			this.endDate = '';
			// 获取盒柜列表
			this.getList();
		},
		// 盒柜单个选中的逻辑方法
		toggleItemSelection(itemArr, i, packageSkuId) {
			itemArr[i].isItemSelect = !itemArr[i].isItemSelect
			if (!itemArr[i].isItemSelect) {
				this.isAllSelected = false;
			}
			// 判断是否单个选择，以及全选之后取消勾选的话标题接口的传参

			const index = this.skuIdItems.indexOf(packageSkuId);
			const indexs = this.skuItem.indexOf(packageSkuId);
			if (itemArr[i].isItemSelect && this.changeAll == "no") {
				this.skuIdItems.push(packageSkuId);
			} else if (this.changeAll == "yes" && !this.isAllSelected && !itemArr[i].isItemSelect) {
				this.skuItem.push(packageSkuId)
			} else if (this.changeAll == "yes" && !this.isAllSelected && itemArr[i].isItemSelect) {
				this.skuItem.splice(indexs, 1);
			} else {
				this.skuIdItems.splice(index, 1);
			}

			// if (index !== -1) {
			// 	// this.skuItem.push(packageSkuId);
			// 	this.skuIdItems.splice(index, 1);
			// } else {
			// 	this.skuIdItems.push(packageSkuId);
			// 	// this.skuItem.splice(index, 1);
			// }
			this.itemList.forEach(item => {
				this.selectSkuIds.push(item.skuId)
			})
			console.log('this.skuIdItems', this.skuIdItems);
			console.log('this.skuItem', this.skuItem);
			if (this.changeAll == "yes" && !this.isAllSelected) {
				packageTotal({
					type: 2,
					isFilter: this.IsFilter,
					packageSkuIds: this.skuItem,
					isOptFor: 2,
					boxSkuIds: this.IsFilter == 1 ? this.selectSkuIds : []
				}).then(res => {
					this.selectedItemCount = res.data
				})
			} else {
				packageTotal({
					type: 2,
					isFilter: this.IsFilter,
					packageSkuIds: this.skuIdItems,
					isOptFor: 1
				}).then(res => {
					this.selectedItemCount = res.data
				})
			}

		},
		// 点击单个锁定方法
		lockItem(outerIndex, innerIndex) {
			this.lockedItems = [];
			// 选中二维数组的单个对象
			const item = this.itemSkuList[outerIndex][innerIndex];
			// 使用this.$set改变视图锁定状态的样式
			this.$set(item, 'locked', !item.locked);
			// 通过选中的跟创建的数组进行比较，如果没有数据就把背包id传入数组，如果有当前背包id则删除
			const index = this.lockedItems.indexOf(item.packageSkuId);
			if (index !== -1) {
				this.lockedItems.splice(index, 1);
			} else {
				this.lockedItems.push(item.packageSkuId);
			}
			console.log(this.lockedItems);
			// 判断是不是锁定状态，如果未锁定那么调用锁定接口，如果锁定了调用解锁接口
			if (item.locked === true) {
				setLock({
					type: 2,
					isOptFor: 1,
					packageSkuIds: this.lockedItems
				}).then(res => {
					if (res.code == 200) {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
						this.getList();
					}
				})
			} else {
				getLock({
					type: 2,
					isOptFor: 1,
					packageSkuIds: this.lockedItems
				}).then(res => {
					if (res.code == 200) {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
						this.getList();
					}
				})
			}
		},
		// 一键锁定方法逻辑
		lockAllItems() {
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行锁定",
							icon: 'none',
							duration: 2000,
						});
					} else {
						this.skuIdItems = [];
						let params = {};
						this.selectSkuIds = [];
						this.itemList.forEach(item => {
							this.selectSkuIds.push(item.skuId)
						})
						if (this.changeAll === 'yes' && this.isAllSelected) {
							params = {
								type: 1,
								isFilter: this.IsFilter,
								boxSkuIds: this.IsFilter == 1 ? this.selectSkuIds : []
							}
						} else if (this.changeAll === 'yes' && !this.isAllSelected) {
							// 部分选传值不勾选的情况
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (!sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							params = {
								type: 2,
								isOptFor: 2,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						} else if (this.changeAll === 'no') {
							// 部分勾选的情况喜爱是部分勾
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							params = {
								type: 2,
								isOptFor: 1,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						}
						setLock(params).then(res => {
							if (res.code == 200) {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
								this.getList();
							} else {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
							}
						})
					}
				})
			})
		},
		// 一键解锁方法逻辑
		unlockAllItems() {
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行解锁",
							icon: 'none',
							duration: 2000,
						});
					} else {

						this.skuIdItems = [];
						let params = {}
						this.selectSkuIds = [];
						this.itemList.forEach(item => {
							this.selectSkuIds.push(item.skuId)
						})
						if (this.changeAll === 'yes' && this.isAllSelected) {
							params = {
								type: 1,
								isFilter: this.IsFilter,
								boxSkuIds: this.selectSkuIds
							}
						} else if (this.changeAll === 'yes' && !this.isAllSelected) {
							// 部分选传值不勾选的情况
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (!sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							params = {
								type: 2,
								isOptFor: 2,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						} else if (this.changeAll === 'no') {
							// 部分勾选的情况喜爱是部分勾
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							params = {
								type: 2,
								isOptFor: 1,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						}
						getLock(params).then(res => {
							if (res.code == 200) {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
								this.getList();
							} else {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
							}
						})
					}
				})
			})
		},
		// 分解方法逻辑
		revokeDetails() {
			// 将字符串转为浮点数
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行分解",
							icon: 'none',
							duration: 2000,
						});
					} else {
						this.skuIdItems = [];
						let params = {};
						this.selectSkuIds = [];
						this.itemList.forEach(item => {
							this.selectSkuIds.push(item.skuId)
						})
						if (this.changeAll === 'yes' && this.isAllSelected) {
							params = {
								type: 1,
								isFilter: this.IsFilter,
								boxSkuId: this.IsFilter == 1 ? this.selectSkuIds : []
							}
							this.setRevokeDetails(params)
						} else if (this.changeAll === 'yes' && !this.isAllSelected) {
							// 部分选传值不勾选的情况
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (!sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							console.log(this.skuIdItems);
							params = {
								type: 2,
								isOptFor: 2,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
							this.setRevokeDetails(params)

						} else if (this.changeAll === 'no') {
							// 部分勾选的情况喜爱是部分勾
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							console.log(this.skuIdItems);
							params = {
								type: 2,
								isOptFor: 1,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
							this.setRevokeDetails(params)
						}
					}
				})
			})
		},
		setRevokeDetails(params) {
			let that = this
			getRevokeDetails(params).then(res => {
				let num = parseFloat(res.message);
				// 将浮点数转为字符串，保留小数点后的非零位
				let formattedNum = num.toString().replace(/(\.\d*?[1-9])0+$/, "$1");
				uni.showModal({
					title: '确认分解',
					content: '当前选中的商品可分解成' + formattedNum + '个晶石',
					success: function (res) {
						if (res.confirm) {
							// 点击确认分解后调用实现分解的方法
							that.packageSkus(params)
						} else if (res.cancel) {
							console.log('取消');
						}
					}
				});
			})
		},
		// 确认分解的方法
		packageSkus(params) {
			uni.showLoading({
				title: '加载中',
				mask: true // 显示透明蒙层，防止触摸穿透
			});
			getSkus(params).then(res => {
				if (res.code == 200) {
					uni.hideLoading();
					uni.showToast({
						title: "分解成功",
						icon: 'none',
						duration: 2000,
					});
					this.getList();
					this.skuIdItems = []
				} else {
					uni.hideLoading();
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000,
					});
				}
			})
		},
		// 申请发货方法
		applyForShipment() {
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行发货",
							icon: 'none',
							duration: 2000,
						});
					} else {
						this.skuIdItems = [];
						let params = {};
						this.selectSkuIds = [];
						this.itemList.forEach(item => {
							this.selectSkuIds.push(item.skuId)
						})
						if (this.changeAll === 'yes' && this.isAllSelected) {
							params = {
								type: 1,
								isFilter: this.IsFilter,
								boxSkuId: this.IsFilter == 1 ? this.selectSkuIds : []
							}
							$setStorage('selectItem', params)
							uni.navigateTo({
								url: `/pages/myBox/confirmOrder`
							});
							return;
						} else if (this.changeAll === 'yes' && !this.isAllSelected) {
							// 部分选传值不勾选的情况
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (!sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							params = {
								type: 2,
								isOptFor: 2,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
							$setStorage('selectItem', params)
							uni.navigateTo({
								url: `/pages/myBox/confirmOrder`
							});
							return;

						} else if (this.changeAll === 'no') {
							// 部分勾选的情况喜爱是部分勾
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})

							params = {
								type: 2,
								isOptFor: 1,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
							$setStorage('selectItem', params)
							uni.navigateTo({
								url: `/pages/myBox/confirmOrder`
							});
							return;
						}

					}
				})
			})




		},
		// 确认申请发货方法
		getApply() {
			if (this.address.id) {
				delivery({
					packageSkuIds: $getStorage("selectItem"),
					addressesId: this.address.id
				}).then(res => {
					if (res.code == 200) {
						uni.showToast({
							title: "申请发货成功",
							icon: 'none',
							duration: 3000,
						});
						this.getList();
						this.selectedItems = [];
						$removeStorage("selectItem");
					} else {
						uni.showToast({
							title: res.message,
							icon: 'none',
							duration: 2000,
						});
					}
				})
			}
		},
		// 转让商品方法
		applyPackClickSale() {
			this.skuIdItems = [];
			let skuId = [];
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请选择商品后再点击转让",
							icon: 'none',
							duration: 2000,
						});
					} else if (sku.isItemSelect) {
						this.skuIdItems.push(sku.packageSkuId)
						skuId.push(sku.skuId)
						if (this.skuIdItems.length > 1 || this.changeAll === 'yes') {
							uni.showToast({
								title: "请单击单个商品进行转让",
								icon: 'none',
								duration: 2000,
							});
						} else {
							// 计算手续费接口
							this.$http("/sale/selectMoneyPriceBySkuId", "get", {
								skuId: skuId[0]
							}).then(res => {
								this.isShowSale = true
								this.salePrice = null
								this.commissionCharge = res.data.commissionCharge
								this.moneyPrice = res.data.moneyPrice
							})
						}
					}
				})
			})
			console.log(this.skuIdItems);
			console.log(skuId);
		},
		// 转让确认方法
		saleShare(price) {
			if (!this.salePrice) {
				uni.showToast({
					title: "请输入转让金额",
					icon: 'none',
					duration: 2000,
				});
				return
			}
			this.isShowSale = false
			let commission = (this.salePrice * (this.commissionCharge / 100)).toFixed(2)
			let account = this.salePrice - (this.salePrice * (this.commissionCharge / 100))
			uni.showModal({
				title: "确认转让",
				content: '上架金额为' + this.salePrice + "镇北币，手续费为" + commission + ",预估到账" +
					account + '镇北币',
				success: (res) => {
					if (res.confirm) {
						this.packclick(this.salePrice);
					} else if (res.cancel) {
						console.log('取消');
					}
				}
			});
		},
		// 转让取消弹框方法
		saleCancel() {
			this.isShowSale = false
		},
		// 点击弹框中的确认转让
		packclick(content) {
			let userid = $getStorage("userInfo")
			packClickSale({
				id: this.skuIdItems[0],
				price: content,
				sellerId: userid.id
			}).then(res => {
				if (res.code == 200) {
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000,
					});
					this.getList();
				} else {
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000,
					});
				}
			})
		},
		// 取消转让
		removeDeleteSale() {
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行操作",
							icon: 'none',
							duration: 2000,
						});
					} else {
						this.skuIdItems = [];
						let params = {};
						this.selectSkuIds = [];
						this.itemList.forEach(item => {
							this.selectSkuIds.push(item.skuId)
						})
						if (this.changeAll === 'yes' && this.isAllSelected) {
							params = {
								type: 1,
								isFilter: this.IsFilter,
								boxSkuIds: this.IsFilter == 1 ? this.selectSkuIds : []
							}
						} else if (this.changeAll === 'yes' && !this.isAllSelected) {
							// 部分选传值不勾选的情况
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (!sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							console.log(this.skuIdItems);
							params = {
								type: 2,
								isOptFor: 2,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						} else if (this.changeAll === 'no') {
							// 部分勾选的情况喜爱是部分勾
							this.itemSkuList.forEach(items => {
								items.forEach(sku => {
									if (sku.isItemSelect) {
										this.skuIdItems.push(sku.packageSkuId)
									}
								})
							})
							console.log(this.skuIdItems);
							params = {
								type: 2,
								isOptFor: 1,
								isFilter: this.IsFilter,
								packageSkuIds: this.skuIdItems
							}
						}
						deleteSale(
							params
						).then(res => {
							if (res.code == 200) {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
								this.getList();
							} else {
								uni.showToast({
									title: res.message,
									icon: 'none',
									duration: 2000,
								});
							}
						})
					}
				})
			})




		},

		// 选择赠送
		compliment() {
			this.itemSkuList.forEach(items => {
				items.forEach(sku => {
					if (!sku.isItemSelect && this.changeAll === 'no') {
						uni.showToast({
							title: "请勾选商品后在进行赠送操作",
							icon: 'none',
							duration: 2000,
						});
					} else {
						this.$refs.popup.open()
						return
					}
				})
			})
		},
		submitData() {
			// 校验开始时间和结束时间是否为空
			if (!this.range.length) {
				uni.showToast({
					title: '请选择时间范围',
					icon: 'none',
					duration: 2000
				});
				return;
			} else {
				this.startDate = this.range[0];
				this.endDate = this.range[1]
			}
			this.getList();
		},
		maskClick(e) {
			console.log('maskClick事件:', e);
		},
		// 关闭弹框
		close() {
			this.$refs.popup.close()
		},
		// 确认赠送
		confirmGift() {
			this.skuIdItems = [];
			let params = {};
			this.selectSkuIds = [];
			this.itemList.forEach(item => {
				this.selectSkuIds.push(item.skuId)
			})
			if (this.changeAll === 'yes' && this.isAllSelected) {
				params = {
					type: 1,
					isFilter: this.IsFilter,
					boxSkuIds: this.IsFilter == 1 ? this.selectSkuIds : []
				}
			} else if (this.changeAll === 'yes' && !this.isAllSelected) {
				// 部分选传值不勾选的情况
				this.itemSkuList.forEach(items => {
					items.forEach(sku => {
						if (!sku.isItemSelect) {
							this.skuIdItems.push(sku.packageSkuId)
						}
					})
				})
				console.log(this.skuIdItems);
				params = {
					type: 2,
					isOptFor: 2,
					isFilter: this.IsFilter,
					packageSkuIds: this.skuIdItems
				}
			} else if (this.changeAll === 'no') {
				// 部分勾选的情况喜爱是部分勾
				this.itemSkuList.forEach(items => {
					items.forEach(sku => {
						if (sku.isItemSelect) {
							this.skuIdItems.push(sku.packageSkuId)
						}
					})
				})
				console.log(this.skuIdItems);
				params = {
					type: 2,
					isOptFor: 1,
					isFilter: this.IsFilter,
					packageSkuIds: this.skuIdItems
				}
			}
			complimentLink(params).then(res => {
				if (res.code == 200) {
					uni.setClipboardData({
						data: res.message,
						success: () => {
							uni.showToast({
								title: '复制成功',
								duration: 2000
							});
							this.close()
						},
						fail: () => {
							uni.showToast({
								title: '复制失败',
								icon: 'none',
								duration: 2000
							});
						}
					});
				} else {
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 2000
					});
				}
			})
		},
		revoke(item) {
			let _this = this
			uni.showModal({
				title: '温馨提示',
				content: '您确定要撤回赠送吗？',
				success: function (res) {
					if (res.confirm) {
						disposeCompliment({
							key: item.key,
							choose: 0
						}).then(res => {
							if (res.code == 200) {
								_this.getSelectToAccepterCompliment();
							}
						})
					}
				}
			});
		},
		checkDetails(item) {
			uni.navigateTo({
				url: `/pages/giftsDetails/index?key=${item.key}`
			})
		}
	}
}
</script>

<style scoped lang="scss">
page {
	background-color: #151515;
}

.index {
	height: 100vh;
	// overflow: hidden;
}

.details-header {
	width: 100%;
	height: 60rpx;
	display: flex;
	align-items: center;

	image {
		width: 40rpx;
		height: 40rpx;
		margin-left: 20rpx;
	}

	text {
		color: #fff;
		margin-left: 15rpx;
	}
}

.uni-collapse-item__title.uni-collapse-item-border,
.uni-collapse-item {
	background-color: rgb(108, 67, 255);
	color: #fff;
}

.rules {
	width: 130rpx;
	height: 70rpx;
	background-image: url(../../static/fontSize.png);
	background-size: 100%;
	background-repeat: no-repeat;
	position: fixed;
	right: 0;
	top: 400rpx;
	text-align: center;
	line-height: 70rpx;
	border-radius: 40rpx 0 0 40rpx;
	font-size: 25rpx;
}

.comrules {
	width: 130rpx;
	height: 70rpx;
	background-image: url(../../static/fontSize.png);
	background-size: 100%;
	background-repeat: no-repeat;
	position: fixed;
	right: 0;
	top: 500rpx;
	text-align: center;
	line-height: 70rpx;
	border-radius: 40rpx 0 0 40rpx;
	font-size: 25rpx;
}

.markDown {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	/* 半透明黑色遮罩层 */
	z-index: 998;
	/* 比弹框的z-index小 */
}

// 一番赏弹框样式
.PriceByyfs {
	position: fixed;
	width: 80%;
	height: 500rpx;
	background-color: #fff;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999;
	text-align: center;
	padding: 20rpx;
	border-radius: 20rpx;

	.sku-money {
		font-size: 34rpx;
		margin: 30rpx 0;
	}

	.yfs-skuList {
		height: 200rpx;
		overflow-y: auto;

		.sale-yfs {
			display: flex;
			height: 150rpx;
			align-items: center;
			margin: 20rpx 20rpx;

			.yfsImg {
				width: 150rpx;
				height: 150rpx;
				border-radius: 15rpx;
				margin-right: 20rpx;
			}

			.sku-yfs {
				height: 150rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: flex-start;
			}

		}
	}



	.warnyfs {
		text-align: left;
		font-size: 25rpx;
		margin-left: 20rpx;
		color: gray;
	}

	.sku-btn {
		display: flex;
		align-items: center;
		margin-top: 40rpx;

		button {
			width: 180rpx;
			height: 80rpx;
			font-size: 25rpx;
			line-height: 80rpx;

		}

		.btn_01 {
			background-color: rgb(108, 67, 255);
			color: #fff;
		}
	}

}

// 转让弹框

.PriceBySku {
	position: fixed;
	width: 70%;
	height: 300rpx;
	background-color: #fff;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999;
	text-align: center;
	padding: 20rpx;
	border-radius: 20rpx;

	.sku-money {
		font-size: 34rpx;
		margin: 30rpx 0;
	}

	.sale-sku {
		display: flex;
		height: 80rpx;
		align-items: center;
		margin: 20rpx 20rpx;

		.sku-input {
			width: 60%;
			height: 80rpx;
			background-color: rgb(238, 238, 238);
		}

	}

	.sku-btn {
		display: flex;
		align-items: center;
		margin-top: 40rpx;

		button {
			width: 180rpx;
			height: 80rpx;
			font-size: 25rpx;
			line-height: 80rpx;

		}

		.btn_01 {
			background-color: rgb(108, 67, 255);
			color: #fff;
		}
	}

}

// 搜索样式
.dropdown {
	height: 400rpx;
	width: 100%;
	padding-top: 20px;
	padding-bottom: 20px;
	/* position: fixed; */
	position: absolute !important;
	/* 将 fixed 改为 absolute */

	/* 修改这里 */
	/* top: 100%; */
	bottom: 0;
	display: block;
	/* 添加这一行 */
	/* width: 100%; */
	background-color: #fff !important;
	border: 1px solid #5d4748;
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
	// box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 999;
	display: flex;
	flex-direction: column;
}

.dropdown-sift {
	margin: 0 auto;
	font-size: 40rpx;
	font-weight: 900;
	padding-bottom: 20rpx;
	color: #000;
}

.dropdown-time {
	font-weight: 100;
	margin-left: 20px;
	margin-bottom: 20rpx;
	font-size: 38rpx;
	color: #fff;
}

.time-options {
	width: 100%;
	padding-top: 10px;
	padding-bottom: 10px;
	display: flex;
	justify-content: space-evenly;
}

.data {
	border: 5rpx solid rgb(108, 67, 255);
	color: #fff;
	font-weight: 100;
	height: 100rpx;
	font-size: 30rpx;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 20rpx;
	padding: 0 30rpx;

	input {
		font-size: 35rpx;
		color: #fff;
	}
}

.time-range {
	height: 80rpx;
	padding: 50rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.button-container {
	width: 90%;
	border-radius: 50rpx;
	margin: auto;
	display: flex;
	justify-content: space-between;
}

.reset-button {
	width: 50%;
	height: 80rpx;
	color: #fff;
	border-radius: 50rpx 0 0 50rpx;
	background: rgb(108, 67, 255);

	text {
		line-height: 80rpx;
		font-size: 38rpx;
	}
}

.confirm-button {
	width: 50%;
	height: 80rpx;
	color: #fff;
	border-radius: 0 50rpx 50rpx 0;
	background: rgb(108, 67, 255);

	text {
		line-height: 80rpx;
		font-size: 38rpx;
	}
}

.header {
	width: 100%;
	height: 130rpx;
	border-bottom: 1rpx solid #5d4748;
	display: flex;
	align-items: center;
	// justify-content: space-around;
	box-sizing: border-box;

	.nav-content-right {
		width: 60rpx;
		height: 60rpx;
		padding: 0 10px;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.search-input-wrapper {
		height: 90rpx;
		// border-radius: 50rpx;
		width: 500rpx;
		flex: 1;
		background-color: #fff;
		padding: 0 30rpx;
		font-weight: 100;
		display: flex;
		align-items: center;
		position: relative;
		border-radius: 15rpx;

		.icon-search {
			margin-right: 10rpx;
			color: #000;
			z-index: 999;
		}

		input {
			background-color: transparent;
			padding: 0;
			height: 90%;
			line-height: 70rpx;
			color: #000;
		}

		.search-btn {
			width: 130rpx;
			height: 70rpx;
			line-height: 70rpx;
			font-size: 32rpx;
			position: absolute;
			right: 5%;
			color: #fff;
			background: rgb(108, 67, 255);
		}
	}

	.filter-container {
		position: relative;
		z-index: 999;
	}

	.filter-header {
		display: flex;
		align-items: center;
		cursor: pointer;
	}

	p {
		color: #adafc1;
		font-weight: 900;
		font-size: 33rpx;
	}

	.active {
		background-image: -webkit-linear-gradient(0deg, rgb(217, 163, 123), rgb(240, 206, 173), rgb(217, 163, 123));
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
	}
}

.level {
	margin-top: 30rpx;
	display: flex;
	width: 100%;
	justify-content: space-between;
	box-sizing: border-box;
	padding: 0 10rpx;
	overflow-x: auto;

	view {
		flex-shrink: 0;
		margin-right: 10rpx;
		color: rgb(255, 255, 255);
		width: 110rpx;
		height: 70rpx;
		line-height: 70rpx;
		font-weight: 100;
		font-size: 24rpx;
		text-align: center;
		border-radius: 5rpx;
		background: url(../../static/selecticon.png) center/ contain no-repeat;
	}

	.active {
		color: rgb(255, 255, 255);
		background: url(../../static/btnicon.png) center/ contain no-repeat;
	}
}

.all {
	width: 100%;
	display: flex;
	justify-content: space-between;
	margin-top: 30rpx;
	align-items: center;
	box-sizing: border-box;
	padding: 0 20rpx;

	.check {
		display: flex;
		color: rgb(255, 255, 255);
		font-weight: 100;
		align-items: center;

		text {
			margin-left: 10rpx;
		}
	}

	.right {
		color: rgb(255, 255, 255);
		background: rgb(108, 67, 255);
		width: 180rpx;
		height: 70rpx;
		line-height: 70rpx;
		font-weight: 100;
		font-size: 28rpx;
		text-align: center;
		border-radius: 15rpx;
	}
}

.itemListBox {
	width: 100%;
	height: 750rpx;
	overflow: scroll;
	margin-bottom: 200rpx;

	.tabList {
		width: 200rpx;
		color: white;
		display: flex;
		height: 50rpx;
		font-size: 30rpx;
		padding: 0 20rpx;
		margin: 0 30rpx 20rpx 0;
		justify-content: space-between;

		.active {
			color: rgb(108, 67, 255);
		}
	}

	.itemList {
		width: 100%;
		box-sizing: border-box;
		padding: 0 20rpx;

		.daditem {
			margin-bottom: 30rpx;
			background: url(../../static/boxCard.png) center/ cover no-repeat;
			border: 2rpx solid rgb(108, 67, 255);
			box-sizing: border-box;
		}

		.unitem {
			background: #1a1724;
		}

		.item {
			width: 100%;
			border-radius: 5rpx;
			height: 200rpx;
			display: flex;
			align-items: center;
			box-sizing: border-box;
			padding: 0 20rpx;

			.check {
				transform: scale(0.8);
			}

			.img {
				width: 150rpx;
				height: 150rpx;
				margin-left: 20rpx;
				box-sizing: border-box;
				border-radius: 10rpx;
				overflow: hidden;
				background-image: -webkit-linear-gradient(-45deg, rgb(91, 184, 152), rgb(227, 240, 239), rgb(91, 184, 152));
				display: flex;
				align-items: center;
				justify-content: center;

				img {
					width: 140rpx;
					height: 140rpx;
					border-radius: 10rpx;
					background-color: #151515;
				}
			}

			.datas {
				width: 424rpx;
				height: 180rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				color: #ececec;
				font-weight: 100;
				margin-left: 20rpx;
				font-size: 25rpx;

				.price {
					color: #ececec;
				}

				b {
					font-weight: 100;
					color: #858585;
					margin-right: 10rpx;
				}

				h2 {
					font-size: 28rpx;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}

			.lock {
				position: absolute;
				right: 30rpx;
				text-align: center;

				view {
					margin-top: 16rpx;
				}
			}
		}

		.uni-collapse {
			margin: 20rpx 0;
		}

		&.colStyle {
			::v-deep .uni-collapse-item__wrap-content::after {
				visibility: hidden;
				display: block;
				font-size: 0;
				content: " ";
				clear: both;
				height: 0;
			}

			.item {
				display: block;
				position: relative;
				width: calc(50% - 20rpx);
				float: left;
				height: auto;
				padding-bottom: 20rpx;
				border: 1px solid purple;
				box-sizing: border-box;
				margin: 10rpx;
				border-radius: 30rpx;
				overflow: hidden;
			}

			.check {
				position: absolute;
				top: 10rpx;
				right: 10rpx;
				z-index: 2;
			}

			.img {
				width: 260rpx;
				height: 260rpx;
				margin: 0 auto;
				border-radius: 5rpx;

				overflow: hidden;

				img {
					width: 100%;
					height: 100%;
					border-radius: 5rpx;
					background-color: #151515;
				}
			}

			.lock {
				position: absolute;
				top: 180rpx;
				right: 10rpx;
			}
		}
	}
}

.bottom {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	padding: 0 20rpx;
	margin-top: 30rpx;
	justify-content: flex-start;
	position: fixed;
	bottom: 2%;

	.left,
	.middle,
	.right {
		color: #fff;
		background: url(../../static/btnicon.png) center/ contain no-repeat;
		width: 160rpx;
		height: 100rpx;
		line-height: 100rpx;
		font-weight: 800;
		font-size: 28rpx;
		text-align: center;
		border-radius: 5rpx;
		margin-left: 20rpx;
	}
}

.num {
	width: 100%;
	text-align: center;
	color: #fff;
	margin-top: 20rpx;
	position: fixed;
	bottom: 10%;
}

.pickerClass {
	color: #fff;
	background-color: #000;
	border-color: #6c43ff;
}

.popup_content {
	width: 600rpx;
	// height: 600rpx;
	border-radius: 20rpx;
	background-color: #fff;
	padding: 20rpx;
	box-sizing: border-box;
}

.popop_head {
	display: flex;
	justify-content: end;
}

.popup_title {
	text-align: center;
	font-size: 36rpx;
	font-weight: bold;
	margin-bottom: 20rpx;
	color: #333;
}

.popup_details {
	padding: 20rpx;
	text-indent: 2em;
	text-align: center;
	font-size: 28rpx;
	color: #2d2d2d;
	line-height: 1.5em;
}

.popup_btnGroup {
	display: flex;
	height: 70rpx;
	overflow: hidden;
	line-height: 70rpx;
	margin-top: 20rpx;
	margin-bottom: 40rpx;
}

.u-btn {
	flex: 1;
	height: 100%;
	text-align: center;
	background-color: #efefef;
	color: #303030;
	border-radius: 8rpx;
}

.u-btn-danger {
	margin-left: 40rpx;
	background-color: #d9625e;
	color: #fff;
}

.popup_dangerTitle {
	color: #d9625e;
	font-size: 24rpx;
	margin-bottom: 20rpx;
}

.presenter {
	color: #fff;
	margin-left: 20rpx;
	position: relative;
	flex: 1;
	height: 100%;
	// padding-top: 60rpx;
	display: flex;
	flex-direction: column;
	justify-content: center;

	.presenter_status {
		color: #c84e57;
		font-size: 32rpx;
	}

	.presenter_time {
		font-size: 24rpx;
		margin-top: 20rpx;
	}

	.right_btn_group {
		position: absolute;
		right: 20rpx;
		top: 20rpx;

		.u-btn {
			display: inline-block;
			height: 60rpx;
			line-height: 60rpx;
			padding: 0 20rpx;
		}

		.u-primary-btn {
			background-color: #6c43ff;
			color: #fff;
		}

		.u-btn+.u-btn {
			margin-left: 20rpx;
		}
	}
}
</style>